﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IDAL;
using SQLServerDAL;

namespace DALFactory
{
    public class DALFactory
    {
        public static IDataControl CreatInstance(String dbType)
        {
            IDataControl sqlServerDAL = null;

            if(dbType == "Oracle")
            {

            }
            else if (dbType == "SQLServer")
            {
                sqlServerDAL = new SQLServerDAL.SQLServerDAL();
            }
            else
            {
                throw new Exception("No such DB type!");
            }

            return sqlServerDAL;
        }
    }
}
